package com.ipcount.autoconfig;

import com.ipcount.properties.IpProperties;
import com.ipcount.properties.TestValue;
import com.ipcount.service.IpCountService;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Import;
import org.springframework.scheduling.annotation.EnableScheduling;

/**
 * 把自定义方法加载进来，直接把自定义方法加载成bean对象
 *
 * @author xiaozhua
 * @date 2022/9/13 11:32
 */
/**
 * @EnableScheduling开启定时任务功能
 */

//@EnableScheduling
/**
 * 加载自定义的属性配置类
 */
@EnableConfigurationProperties(IpProperties.class)
//@Import(IpProperties.class)
public class IpAutoConfiguration {
    @Bean
    public IpCountService ipCountService() {
        return new IpCountService();
    }
}
